// GLIFSelSpring.cpp: implementation of the GLIFSelSpring class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GLIFSelSpring.h"
#include "SpringSet.h"
#include "PersistentFacade.h"
#include "Part.h"
#include "SupportHanger.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

GLIFSelSpring::GLIFSelSpring()
{
}

GLIFSelSpring::~GLIFSelSpring()
{

}

Spring* GLIFSelSpring::GetSpring()
{
/*	CString strSql;
	ASSERT(GetOwner());
	ASSERT(GetOwner()->GetOwner());

	m_strSHStyle = GetOwner()->GetOwner()->GetOwner()->GetSupportStyle();
	if(m_strSHStyle.IsEmpty())
		return NULL;

	strSql.Format(_T("seq = %s"), m_strSHStyle.Right(2));
	SpringSet* pSet = GetPersistentFacade().GetSpringSet();
	pSet->SetDataStandard(GetOwner()->GetStandard());

	pSet->GetSpringSet(strSql);

	Spring* pSpring = pSet->GetFirstSpring();
	pSet->Close();
	if(pSpring == NULL)
	{
		return NULL;
	}

	if(!CanInSerial(pSpring))
	{
		delete pSpring;
		return NULL;
	}

	return pSpring;*/
	return NULL;
}

BOOL GLIFSelSpring::CanInSerial(Spring* pSpring)
{
/*	pSpring->SpringSerialNum(atoi(m_strSHStyle.Left(1)));
	if(pSpring->IsLegal(this->WorkLoad(),
		this->LoadChangeCoefficient(), this->HotDisplacement()))
		return TRUE;*/
	return FALSE;
}